package net.oschina.simpleplus.ser.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.oschina.simpleplus.dao.PostDao;
import net.oschina.simpleplus.entity.Post;
import net.oschina.simpleplus.ser.PostSer;
import net.oschina.simpleplus.vo.PostVo;

@Service
public class PostSerImpl implements PostSer{

	@Autowired
	private PostDao postDao;
	
	@Override
	public List<PostVo> findPostsByPage(int page) {
		return postDao.findPostsByPage(page);
	}

	@Override
	public List<PostVo> findPostsById(int id, int page) {
		return postDao.findPostsById(id, page);
	}

	@Override
	public void insertPost(Post post) {
		postDao.insertPost(post);
	}

	
}
